{load header}
<!--/H-->

    <!-- 内容区 -->
    <div id="main-content">
        <div id="top-alert" class="fixed alert alert-error" style="display: none;">
            <button class="close fixed" style="margin-top: 4px;">&times;</button>
            <div class="alert-content">这是内容</div>
        </div>
        <div id="main" class="main">
            
            <!-- nav -->
                        <!-- nav -->
            

            
	<div class="main-title">
		<h2>溜溜币商品管理</h2>
	</div>
	<div class="cf">
		<a class="btn" href="{eval echo site_url('gift/gift_add')}">新 增</a>
		<!-- 高级搜索 -->
		<div class="search-form fr cf">
			<div class="sleft">


				<input type="text" name="q" class="search-input" value="{$keyword}" placeholder="请输入商品名称">
				<a class="sch-btn" href="javascript:;" id="search" url=""><i class="btn-search"></i></a>
			</div>
<!-- 			<div class="btn-group-click adv-sch-pannel fl">
				
                <button class="btn">高 级<i class="btn-arrowdown"></i></button>
                <div class="dropdown cf">
                	<div class="row">
                		<label>创建时间：</label>
                		<input type="text" id="time-start" name="time-start" class="text input-2x" value="{$timestart}" placeholder="起始时间" /> -                		
                        <div class="input-append date" id="datetimepicker"  style="display:inline-block">
                            <input type="text" id="time-end" name="time-end" class="text input-2x" value="{$timesend}" placeholder="结束时间" />
                            <span class="add-on"><i class="icon-th"></i></span>
                        </div>
                	</div>
                </div>
            </div> -->
		</div>
	</div>
	<div class="tab-wrap">
		<ul class="tab-nav nav">
			<li ><a href="{eval echo site_url('gift/index')}">实物商品</a></li>
			<li class="current"><a href="{eval echo site_url('gift/gift_virtual1')}">虚拟商品</a></li>
		</ul>
		
		<div class="tab-content">
			
			<!-- 数据列表 -->
			<div class="data-table table-striped">
				<table>
					<thead>
						<tr>
						<th >编号</th>
						<th>标题</th>
                                                <th>所需金额</th>
                                                <th>vip奖励基数</th>
						<th>所属栏目</th>
						<th>作者</th>
                                                <th>是否首页显示</th>
						<th>状态</th>
                                                <th>添加时间</th>
						<th>操作</th>
						</tr>
					</thead>
					<tbody>
						<!--{loop $list $k1 $val}-->
						<tr>
							<td>{$val['id']}</td>
							<td>{$val['title']}</td>
							<td>{$val['amount']}</td>
							<td>{$val['award_amount']}</td>
                                                        <td>{$val['cate_name']}</td>
                                                        <td>{$val['admin_name']}</td>
                                                        <td>
							<a title="<!--{if ($val['is_index'])=='0' }-->点击启用<!--{else}-->点击关闭<!--{/if}-->" href="{eval echo site_url('gift/gift_setindex').'?ids='.$val['id'].'&index='.abs(1-$val['is_index'])}" class="ajax-get"><!--{if ($val['is_index'])=='0' }--><span style="color:#ff0000">关闭</span><!--{else}-->启用<!--{/if}--></a>
							</td>
							<td>
							<a title="<!--{if ($val['status'])=='0' }-->点击启用<!--{else}-->点击关闭<!--{/if}-->" href="{eval echo site_url('content/gift_setstatus').'?ids='.$val['id'].'&status='.abs(1-$val['status'])}" class="ajax-get"><!--{if ($val['status'])=='0' }--><span style="color:#ff0000">关闭</span><!--{else}-->启用<!--{/if}--></a>
							</td>
                                                        <td>{$val['create_time']}</td>
							<td>
							<a title="编辑" href="{eval echo site_url('gift/gift_edit').'?id='.$val['id']}">编辑</a>
							<a title="删除" href="{eval echo site_url('gift/gift_remove').'?id='.$val['id']}" class="confirm ajax-get">删除</a>
							</td>
						</tr>
						<!--{/loop}-->
					</tbody>
				</table>
				<!-- 分页 -->
				<div class="page">
					<div>
					{$showpage}
					<span class="rows">共 {$Total} 条记录</span>
					</div>
				</div>
			</div>
	
		</div>
	</div>
<script type="text/javascript">
	$(function(){
		//搜索功能
		$("#search").click(function(){
			var url = $(this).attr('url');
	        var query  = $('.search-form').find('input').serialize();
	        query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
	        query = query.replace(/^&/g,'');
	        if( url.indexOf('?')>0 ){
	            url += '&' + query;
	        }else{
	            url += '?' + query;
	        }
			window.location.href = url;
		});
	});
</script>
<!--F-->{load footer}